import 'package:intl/intl.dart';

class Tools {

  // ignore: non_constant_identifier_names
  static String FORMATTER1 ='yy-MM-dd hh:mm:ss';

  static int currentTimeMillis() {
    return new DateTime.now().millisecondsSinceEpoch;
  }

  static String getTime(String formatterValue) {
    //将时间转换成时间戳
    var nowTime = DateTime.now(); //获取当前时间
    var formatter = DateFormat(formatterValue);
    return formatter.format(nowTime); //2019-08-28 13:45:17.890514
  }
}
